#!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
@Project : bigDataProject 
@File    : food_api.py
@IDE     : PyCharm 
@Author  : Mario
@Date    : 2022/11/14 11:29 
@Describe: 中台菜品相关接口
"""
from api.middle_api.base_middle_api import BaseMiddleAPI


class FoodAPI(BaseMiddleAPI):

    def list_tree(self, brand_code):
        """
        经营分类树列表
        :param brand_code: 品牌编码
        :return:
        """
        payload = '{"brandCode":"' + str(brand_code) + '"}'
        response = self.http_request('catering-backend/food/operate-category/list-tree', payload, "中台经营分类树列表")
        return response


if __name__ == '__main__':
    test = FoodAPI('sit')
    food_type_list = test.list_tree('823882').json()
    print(food_type_list['data'])
